home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 4037 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  1.3 KB

  1. Path: cnn.Princeton.EDU!franck!tim
  2. From: tim@franck (Tim Hollebeek)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Template delaration problem
  5. Date: 26 Jan 1996 23:12:36 GMT
  6. Organization: Princeton University
  7. Distribution: world
  8. Message-ID: <4ebn54$nra@cnn.Princeton.EDU>
  9. References: <4e8c1i$mpp@phoenix.dse.beckman.com> <ENNO.96Jan26201329@kitz.inferenzsysteme.informatik.th-darmstadt.de>
  10. NNTP-Posting-Host: franck.princeton.edu
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Enno Sandner (enno@inferenzsysteme.informatik.th-darmstadt.de) wrote:
  14. : In article <4e8c1i$mpp@phoenix.dse.beckman.com> jawalker@ccgate.dp.beckman.com (Jack Walker) writes:
  15.  
  16. :    My compiler (BC++ 4.52) complains about the following declaration:
  17.  
  18. :    template < class T, T init_val>
  19. :    class foo
  20. :    { . . . };
  21.  
  22. :    Specifically it complains about the line cntaining the template
  23. :    keyword regarding the type of init_val. Is it valid to define template
  24. :    arguments in terms of other template arguments?
  25.  
  26. : Yes, but it's a new feature that isn't supported by most?any compiler(s).
  27.  
  28. g++ handles it fine (version 2.7.2).
  29.  
  30. --
  31. Tim Hollebeek      | Everything above is a true statement, for sufficiently
  32. PChem Grad Student | false values of true.
  33. Princeton Univ.    | tim@wfn-shop.princeton.edu
  34. -------------------| http://wfn-shop.princeton.edu/~tim
  35.